#ifndef MYPUSHBUTTON_H
#define MYPUSHBUTTON_H

#include <QPushButton>

class MyPushButton : public QPushButton
{
    Q_OBJECT
public:
    //explicit MyPushButton(QWidget *parent = nullptr);

    MyPushButton(QString normalImg, QString pressImg = "");

    //未点击时 按钮图片
    QString normalImage;
    //点击后 按钮图片
    QString pressImage;

    //向下弹
    void moveDown();
    //向上弹
    void moveUp();
    //弹跳动画
    void move_down_up();

    //重写按钮按下 和 释放事件
    void mousePressEvent(QMouseEvent *e);
    void mouseReleaseEvent(QMouseEvent *e);

signals:

};

#endif // MYPUSHBUTTON_H
